package com.baidumap.administrator.happystudy.ui;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.view.View;
import android.widget.TextView;

import com.baidumap.administrator.happystudy.R;
import com.baidumap.administrator.happystudy.base.AppBaseActivity;

import butterknife.Bind;
import butterknife.OnClick;

/**
 * 描述：客服
 * 作者：xiaoxing on 17/4/10 22:13
 * 邮箱：2235445233@qq.com
 */
public class KeFuActivity extends AppBaseActivity {
    @Bind(R.id.tv_tel)
    TextView mTvTel;

    @Override
    public int bindLayout() {
        return R.layout.activity_ke_fu;
    }

    @Override
    public void initView(View view) {
        super.initView(view);
    }

    @Override
    public void doBusiness(Context mContext) {
        super.doBusiness(mContext);
        setHeaderBack();
        setHeaderTitle(R.string.ke_fu);
    }


    @OnClick({R.id.ll_qq, R.id.ll_tel})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.ll_qq:
                break;
            case R.id.ll_tel:
                callPhone();
                break;
        }
    }

    /**
     * 点击打电话
     */
    private void callPhone() {
        Intent in2 = new Intent();
        in2.setAction(Intent.ACTION_CALL);
        in2.setData(Uri.parse("tel:" + getTextViewValue(mTvTel) + ""));
        startActivity(in2);
    }
}